﻿using UnityEngine;

namespace HareGame
{
    /// <summary>
    /// 游戏入口
    /// </summary>
    public partial class GameEntry : MonoBehaviour
    {
        /// <summary>
        /// 功能辅助组件
        /// </summary>
        public static ConfigManager Config
        {
            get;
            private set;
        }

        /// <summary>
        /// 游戏管理组件
        /// </summary>
        public static GameManager GM
        {
            get;
            private set;
        }

        /// <summary>
        /// 事件组件
        /// </summary>
        public static EventManager Event
        {
            get;
            private set;
        }

        /// <summary>
        /// UI组件
        /// </summary>
        public static UIManager UI
        {
            get;
            private set;
        }

        /// <summary>
        /// 对象池组件
        /// </summary>
        public static PoolManager Pool
        {
            get;
            private set;
        }

        /// <summary>
        /// 音效组件
        /// </summary>
        public static AudioManager Audio
        {
            get;
            private set;
        }


        /// <summary>
        /// 数值组件
        /// </summary>
        public static DataManager Data
        {
            get;
            private set;
        }

        /// <summary>
        /// 多语言组件
        /// </summary>
        public static LocalizationManager Localization
        {
            get;
            private set;
        }

        /// <summary>
        /// 数据保存组件
        /// </summary>
        public static GameDataManager GameData
        {
            get;
            private set;
        }

        /// <summary>
        /// 功能辅助组件
        /// </summary>
        public static Util Util
        {
            get;
            private set;
        }

        private static void InitBuiltinComponents()
        {
            Util = Util.Instance;
            Config = ConfigManager.Instance;
            GM = GameManager.Instance;
            GameData = GameDataManager.Instance;
            Event = EventManager.Instance;
            Localization = LocalizationManager.Instance;
            UI = UIManager.Instance;
            Pool = PoolManager.Instance;
            Audio = AudioManager.Instance;
            Data = DataManager.Instance;
        }
    }
}
